home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magic Disk 64
/
Magic_Disk_64_89-11_1989_-_de_Side_B.d64
/
joysprite.demo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
11KB
|
345 lines
10 goto460
15 :
20 rem **** zeilen loeschen ****
25 :
30 fori=4to24:poke781,i:sys59903:next:return
35 :
40 rem **** tastaturabfrage ****
45 :
50 geta$:ifa$<>"w"then50
55 return
60 :
65 rem **** cursor setzen ****
70 :
75 poke783,0:poke781,z:poke782,s:sys65520:return
80 :
85 rem **** sprites an/aus ****
90 :
95 poke53269,peek(53269)or1:return:rem sprite 0 an
100 :
105 poke53269,peek(53269)and254:return:rem sprite 0 aus
110 :
115 poke53269,peek(53269)or2:return:rem sprite 1 an
120 :
125 poke53269,peek(53269)and253:return:rem sprite 1 aus
130 :
135 rem **** bildschirm an/aus ****
140 :
145 poke53265,peek(53265)and239:return:rem aus
150 :
155 poke53265,peek(53265)or16:return:rem an
160 :
165 rem **** peek(2) = 0 ? ****
170 :
175 ifpeek(2)=0thenreturn
180 poke2,0:fori=0to50:next:goto175
185 :
190 rem **** datas einlesen ****
195 :
200 fori=1to8:readm$(i):next:goto250
205 data"[196]atei laden "
210 data"[196]atei speichern "
215 data"[196]atei umbenennen"
220 data"[196]atei kopieren "
225 data"[196]atei loeschen "
230 data"[196]irectory "
235 data"[196]isk-[194]efehl "
240 data"[209]uit "
245 :
250 fori=1to3:readf$(i):next:return
255 data"[200]intergrund"
260 data"[210]ahmen "
265 data"[212]ext "
270 :
275 rem **** farbmenue ****
280 :
285 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
290 print" [221] [198]arben waehlen [221]"
295 print" [171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
300 print" [221][176][192][192][192][192][192][192][192][192][192][192][192][174] [221]"
305 print" [221][221]"f$(1)"[221] [176][192][192][192][192][192][174] [221]"
310 print" [221][173][192][192][192][192][192][192][192][192][192][192][192][189] [221] < [221] [221]"
315 print" [221][176][192][192][192][192][192][192][192][192][192][192][192][174] [173][192][192][192][192][192][189] [221]"
320 print" [221][221]"f$(2)"[221] [176][192][192][192][192][192][174] [221]"
325 print" [221][173][192][192][192][192][192][192][192][192][192][192][192][189] [221] > [221] [221]"
330 print" [221][176][192][192][192][192][192][192][192][192][192][192][192][174] [173][192][192][192][192][192][189] [221]"
335 print" [221][221]"f$(3)"[221] [221]"
340 print" [221][173][192][192][192][192][192][192][192][192][192][192][192][189] [221]"
345 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]":return
350 :
355 rem **** soundchip loeschen ****
360 :
365 fori=0to24:poke54272+i,0:next:return
370 rem **** sound ****
375 :
380 gosub365
385 poke54277,5:poke54278,7:poke54274,2048and255:poke54275,89:poke54272,136
390 poke54273,19:poke54294,50:poke54295,0:poke54296,15:return
395 :
400 poke54276,32or1:forb=1to35:next:poke54276,32and254:return
405 :
410 rem **** explosion
415 :
420 gosub365
425 poke54272,0:poke54273,6:poke54277,45:poke54294,100:poke54295,243
430 poke54296,63:poke54276,0:poke54276,129
435 fori=1to90:poke54272,i:next
440 fori=1to1000:next:return
445 :
450 rem **** titel ****
455 :
460 print"[147]":poke53280,0:poke53281,0:gosub145
465 poke657,128:poke56,140
470 poke56576,(peek(56576)and252)or1
475 poke53272,(peek(53272)and15)or48
480 poke648,140
485 print"[147]"chr$(142)" [158]das powertool fuer basic-programmierer"
490 print" [153][169] [146][169][165][153][169] [146][169][165][153][169][146][169][169][146][169][165]"
495 print" [146] [165] [146] [165] [146] [146] [165]"
500 print" [164] [146] [165] [146] [146] [165] [153][169] [146] [165]"
505 print" [153][169][146][169] [146] [165] [146] [146] [165] [146] [165]"
510 print" [153][169] [146] [165] [153][169] [146] [165][153][169] [146] [165]"
515 print" [146][206] [146][206] [146][206]"
520 print" [154][169] [146][169][165][154][169] [146][169][165][154][169] [146][169][165][154][169][146][169][165][154][169] [146][169] [169] [146][169][165]"
525 print" [146][206] [146] [165] [146] [165] [146] [165] [146] [146][206]"
530 print" [154][169] [146][169][165] [154][169] [146] [165] [154][169] [146] [165] [146] [165] [146] [165] [154][169][146][169][165]"
535 print" [146] [165] [146][206] [146][206] [146] [165] [146] [165] [146][206]"
540 print" [154][169] [146] [165] [146] [165] [154][169][146][169][165] [146] [165] [146] [165] [154][169] [146][169][165]"
545 print" [146][206] [146][206] [146][206] [146][206] [146][206] [146][206] [146][206]"
550 print" [151]written by"
555 print" [152]carsten manshusen"
560 print" [155](c) cocoa beach artworks 1989":gosub155
565 ifl=1thengoto585
570 poke147,0:sys57812"joysprite",8,1:sys62631
575 sys57812"demo.sprites",8,1:sys62631
580 gosub200:poke53276,0:poke53287,1:poke36857,195
585 poke36856,192:print" <d> = demo";
590 geta$:ifa$<>"d"then590
595 gosub145
600 :
605 rem **** anleitung ****
610 :
615 print"[147]"chr$(14)" [151][202][207][217][211][208][210][201][212][197] - [196][197][205][207]"
620 print" [152][202][207][217][211][208][210][201][212][197] - [196][197][205][207]"
625 print" [155][202][207][217][211][208][210][201][212][197] - [196][197][205][207]"
630 print"[163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]";
635 print" [154][198]uer die meisten [208]rogramme ist die"
640 print" [211]pritesteuerung in [194]asic viel zu lang-"
645 print" sam und in vernuenftiger [199]eschwindig-"
650 print" keit nur in [193]ssembler zu realisieren."
655 print" [196]as [212]ool [202][207][217][211][208][210][201][212][197] hebt dieses [205]anko"
660 print" auf und ermoeglicht es endlich auch"
665 print" dem [194]asic-[208]rogrammierer, auf dem [195]64"
670 print" professionelle [208]rogramme zu schreiben."
675 print" [202][207][217][211][208][210][201][212][197] ist eine kleine [193]ssembler-"
680 print" routine, die im [201]nterrupt ueber einen"
685 print" der beiden [202]oystickports [211]prite 0 in"
690 print" beliebiger [199]eschwindigkeit ueber den"
695 print" [194]ildschirm bewegt. [196]as [194]asic-[208]rogramm"
700 print" laeuft dabei ganz normal weiter."
705 print" [202][207][217][211][208][210][201][212][197] wird mit ',8,1' nachgeladen"
710 print" und belegt den [211]peicher ab $c000."
715 print" <[215]> = [215][197][201][212][197][210]";
720 gosub155:gosub50:gosub30
725 print" [154][202][207][217][211][208][210][201][212][197] wird aufgerufen durch"
730 print" [211][217][211] 49152, [202]oystickport (1-2),"
735 print" [212]empo (1-6),"
740 print" [199]renze/oben (0-255),"
745 print" [199]renze/unten (0-255),"
750 print" [199]renze/links (0-344),"
755 print" [199]renze/rechts (0-344)."
760 print" [196]ie alten [211]prite-[208]okes sind dabei nach"
765 print" wie vor zur [198]arbgebung sowie zum [193]n-"
770 print" und [193]bschalten etc. noetig, [202][207][217][211][208][210][201][212][197]"
775 print" uebernimmt lediglich die [211]teuerung von"
780 print" [211]prite 0."
785 print" [196]ie [199]renzparameter dienen dazu, den"
790 print" [194]ildschirmbereich, ueber den [211]prite 0"
795 print" bewegt werden kann, beliebig zu be-"
800 print" stimmen."
805 print" <[215]> = [215][197][201][212][197][210]";
810 gosub50:gosub30
815 print" [154][193]bgeschaltet wird [202][207][217][211][208][210][201][212][197] mit"
820 print" [211][217][211] 49290."
825 print" [196]ie alte [201][210][209]-[210]outine wird dann wieder"
830 print" initialisiert."
835 print" [215]urde der [198]euerknopf gedrueckt, wird"
840 print" der [215]ert 1 in die unbenutzte [211]peicher-"
845 print" stelle $02 geschrieben. [196]iese muss"
850 print" nach der [193]uswertung im [194]asic-[208]rogramm"
855 print" ('[201][198] [208][197][197][203](2)=1 [212][200][197][206] [199][207][212][207]') 'per [200]and'"
860 print" mit '[208][207][203][197] 2,0' geloescht werden."
865 print" [202][207][217][211][208][210][201][212][197] eroeffnet dem [194]asic-[208]ro-"
870 print" grammierer eine [198]uelle von neuen [205]oeg-"
875 print" lichkeiten, seine [208]rogramme zu gestal-"
880 print" ten ([193]uch diese [196]emo wurde in reinem"
885 print" [194]asic geschrieben!):"
890 print" <[215]> = [215][197][201][212][197][210]";
895 gosub50:gosub30
900 :
905 rem **** demo 1: menueauswahl ****
910 :
915 print" [154]- [208]rofessionelle [205]enue-[193]uswahl -"
920 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
925 print" [221] [221][153][146][161]"
930 fori=1to8:print" [221] "m$(i)" [221][153][146][161]":next
935 print" [221] [221][153][146][161]"
940 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][153][146][161]"
945 print" [162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146][190]"
950 print" [211]teuerung ueber [202]oystick in [208]ort 2"
955 print" <[215]> = [215][197][201][212][197][210]";
960 :
965 sys49152,2,1,124,184,128,240
970 poke53248,170:poke53249,125:gosub95
975 aa=0:s=12:gosub175
980 geta$:ifa$="w"then1110
985 ifpeek(2)=1then1020
990 y=peek(53249)
995 a=int((y-122)/8+1)
1000 ifa=aathen980
1005 ifaa<>othenz=aa+8:gosub75:print""m$(aa)
1010 z=a+8:gosub75:print"[153]"m$(a):aa=a:goto980
1015 :
1020 gosub75:print""m$(a):gosub105:sys49290
1025 print" [154][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
1030 print" [221] [221][146][161]"
1035 print" [154][221] [193]usgewaehlt wurde: [221][146][161]"
1040 print" [154][221] ------------------ [221][146][161]"
1045 print" [154][221] "m$(a)" [221][146][161]"
1050 print" [154][221] [221][146][161]"
1055 print" [154][221] [158][205][197][206][213][197][154] [221][146][161]"
1060 print" [154][221] [221][146][161]"
1065 print" [154][173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][146][161]"
1070 print" [162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146][190]"
1075 poke53248,100:poke53249,166
1080 sys49152,2,1,163,167,78,107
1085 gosub95:gosub175
1090 geta$:ifa$="w"then1110
1095 ifpeek(2)=1thengosub105:sys49290:goto915
1100 goto1090
1105 :
1110 gosub105:sys49290:gosub30
1115 :
1120 rem **** demo 2: farbmenue ****
1125 :
1130 print" [154]- [203]omfortable [208]rogramm-[194]edienung -[155]":gosub285
1135 print" [211]teuerung ueber [202]oystick in [208]ort 2"
1140 print" <[215]> = [215][197][201][212][197][210][155]";
1145 sys49152,2,2,126,202,83,266
1150 poke36856,193:poke53248,170:poke53249,143:gosub95:a=0:aa=0:af=0
1155 :
1160 geta$:ifa$="w"then1325
1165 ifpeek(2)=0then1160
1170 poke2,0:x=peek(53248):y=peek(53249)
1175 ifx<93then1160
1180 ifx>184then1205
1185 ify>133andy<148thena=1:goto1230
1190 ify>157andy<172thena=2:goto1230
1195 ify>181andy<196thena=3:goto1230
1200 goto1160
1205 ifx<205orx>249ora=0then1160
1210 ify>141andy<156thenaf=1:goto1250
1215 ify>165andy<180thenaf=2:goto1250
1220 goto1160
1225 :
1230 ifa=aathen1160
1235 ifaa<>0thengosub75:print""f$(aa)
1240 s=10:z=8+a*3:gosub75:printf$(a):aa=a:gosub175:goto1160
1245 :
1250 onagoto1255,1260,1265
1255 f=peek(53281):goto1270
1260 f=peek(53280):goto1270
1265 f=peek(646)+240
1270 ifaf=2then1285
1275 f=f-1:iff=239thenf=255
1280 goto1290
1285 f=f+1:iff=256thenf=240
1290 onagoto1295,1300,1305
1295 poke53281,f:gosub175:goto1160
1300 poke53280,f:gosub175:goto1160
1305 poke646,f-240:print"";:gosub285:gosub75:printf$(a):gosub175:goto1160
1310 :
1315 rem **** demo 3: spiel ****
1320 :
1325 gosub105:sys49290:gosub30:poke53280,0:poke53281,0
1330 print" [154]- [211]chnelle [211]piel-[211]teuerung -"
1335 print" [152][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174][176][192][192][192][192][192][192][192][192][192][192][174]"
1340 print" [221][155] [152][221][221][158][176][192][192][192][192][192][192][192][192][174][152][221][151][146][161]"
1345 print" [152][221][155] [205]aeusejagd [152][221][221][158][221] [205]aeuse-[221][152][221][151][146][161]"
1350 print" [152][221][155] ------------ [152][221][221][158][221] jagd [221][152][221][151][146][161]"
1355 print" [152][221][155] [194]ei diesem [196]emo- [152][221][221][158][173][192][192][192][192][192][192][192][192][189][152][221][151][146][161]"
1360 print" [152][221][155] [211]piel muss man [152][221][171][192][192][192][192][192][192][192][192][192][192][179][151][146][161]"
1365 print" [152][221][155] mit seinem [206]etz so [152][221][221][154] [152][221][151][146][161]"
1370 print" [152][221][155] viele [211][195][200][215][193][210][218][197] [152][221][221][154] [205]aeuse: [152][221][151][146][161]"
1375 print" [152][221][155] [205]aeuse wie moeg- [152][221][221][154] 0 [152][221][151][146][161]"
1380 print" [152][221][155] lich fangen, die [152][221][221][154] [152][221][151][146][161]"
1385 print" [152][221][155] [210][207][212][197][206] duerfen [152][221][171][192][192][192][192][192][192][192][192][192][192][179][151][146][161]"
1390 print" [152][221][155] nicht beruehrt [152][221][221][146][211]teuerung [152][221][151][146][161]"
1395 print" [152][221][155] werden! [152][221][221][146]ueber [152][221][151][146][161]"
1400 print" [152][221][155] [158][211][208][201][197][204][197][206][155] [152][221][221][146][202]oystick [152][221][151][146][161]"
1405 print" [152][221][155] [152][221][221][146][208]ort 2 [152][221][151][146][161]"
1410 print" [152][173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189][173][192][192][192][192][192][192][192][192][192][192][189][151][146][161]"
1415 print" [188][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146][190]"
1420 print" <[215]> = [215][197][201][212][197][210]";
1425 poke36856,192:poke53248,166:poke53249,208
1430 sys49152,2,1,204,208,139,188
1435 gosub95:gosub175
1440 geta$:ifa$="w"then1620
1445 ifpeek(2)<>1then1440
1450 gosub105:sys49290
1455 print" [152][176][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][178][192][192][174]"
1460 print" [221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221]"
1465 print" [221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221]"
1470 fori=1to4
1475 print" [171][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][219][192][192][179]"
1480 print" [221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221]"
1485 print" [221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221][155] [152][221]":next
1490 print" [173][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][177][192][192][189]"
1495 ift=0thent=1
1500 gosub380:m=0:s=27:z=14:poke36856,194
1505 poke53278,0:poke53248,56:poke53249,202
1510 poke53288,0:poke53250,125:poke53251,152
1515 gosub95:gosub115:fori=0to900:next
1520 sys49152,2,3,103,205,52,202
1525 :
1530 i=0:ii=int(rnd(0)*7)+4
1535 geta$:ifa$="w"then1615
1540 ifpeek(53278)and3<>0then1575
1545 i=i+1:ifi<iithen1540
1550 gosub125:x=53+int(rnd(0)*7)*24:y=104+int(rnd(0)*5)*24
1555 poke53250,x:poke53251,y
1560 f=int(rnd(0)*2):iff=1thenf=2
1565 poke53288,f:gosub115:goto1530
1570 :
1575 sys49290:ifpeek(53288)=242then1600
1580 gosub400:m=m+1:gosub75:print""mid$(str$(m),2,len(str$(m)))
1585 gosub105:gosub125
1590 ifm=99999999then1605
1595 goto1505
1600 poke53280,2:gosub420:poke53280,0
1605 gosub105:gosub125:goto1330
1610 :
1615 gosub125
1620 gosub105:sys49290
1625 ift=1thent=0:gosub365
1630 gosub30
1635 print" [154][196]as war natuerlich nur eine kleine"
1640 print" [193]uswahl der neuen [205]oeglichkeiten mit"
1645 print" [202][207][217][211][208][210][201][212][197]."
1650 print" [215]as wirklich alles in dieser [210]outine"
1655 print" steckt, wird wahrscheinlich jeder"
1660 print" selbst entdecken, wenn er [202][207][217][211][208][210][201][212][197]"
1665 print" in seinen [194]asic-[208]rogrammen verwendet."
1670 print" [214][201][197][204] [211][208][193][211][211] [196][193][194][197][201] !"
1675 print" [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
1680 print" [221][154][195]arsten [205]anshusen[221]"
1685 print" [221][154][215]eserstr. 54 [221]"
1690 print" [221][154]2850 [194]remerhaven [221]"
1695 print" [221][154][212]el.: 0471/71547 [221]"
1700 print" [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
1705 print" <[206]> = [206][207][195][200] [197][201][206][205][193][204] <[197]> = [197][206][196][197]";
1710 geta$:ifa$=""then1710
1715 ifa$="n"thenl=1:gosub145:goto485
1720 ifa$<>"e"then1710
1725 gosub145:sys64738